#! /usr/bin/env python
# -*- coding: utf-8 -*-

# @author: xmj
# @date: 2025/5/30
from pathlib import Path

class BaseConf:

    BASE_URL = 'http://192.168.11.63:32565/#/login'
    BROWSER = "chromium"
    HEADLESS = False
    TIMEOUT = 30000
    SCREENSHOT_ON_FAILURE = True
    # 企业侧用户
    ACCOUNT = '15922222222'
    PASSWORD = 'tc123456'
    # 园区侧用户
    ACCOUNT_PARK = '15911111111'
    PASSWORD_PARK = 'tc123456'

    # mysql
    MYSQL_HOST = '192.168.11.63'
    MYSQL_PORT = 31935
    MYSQL_USER = 'root'
    MYSQL_PASSWORD = 'root'

    # postgres
    CMDB_HOST = '192.168.11.63'
    CMDB_PORT = 32253
    CMDB_DATABASE = 'hgyq_cmdb'
    CMDB_USER = 'postgres'
    CMDB_PASSWORD = 'tc123456'

    # 项目根目录
    PROJECT_ROOT = Path(__file__).parent.parent.parent / "ui_automation_test"
    # 主要目录路径
    TEST_CASES_DIR = PROJECT_ROOT / "test_cases"
    TEST_DATAS_DIR = PROJECT_ROOT / "datas"
    CONFIG_DIR = PROJECT_ROOT / "conf"
    LOGS_DIR = PROJECT_ROOT / "logs"
    REPORTS_DIR = PROJECT_ROOT / "reports"
